Skip to content

Instantly share code, notes, and snippets.

@privatenumber
privatenumber / light-dark-image.svg
Last active October 18, 2024 02:09
Light/dark mode SVG image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@2KAbhishek
2KAbhishek / Shell_Keybindings.md
Last active October 18, 2024 02:07
Keyboard shortcuts for bash/zsh

Shell Keybindings

Navigation 🚀

Keybinding Action
Alt + f/b Move cursor to previous/next word
Ctrl + a/e Move cursor to beginning/end of command
Ctrl + xx Toggle between the start of line and current cursor position
@yonatanh20
yonatanh20 / README.md
Last active October 18, 2024 02:05
Enabling SocketCAN on WSL2 walkthrough

#Enabling SocketCAN on WSL2 Preface: this walkthrough is a hand-holdy step by step tutorial to enable SocketCan on your WSL2 instance (Ubuntu 20.04).

To enable SocketCAN's can-utils on WSL we need to enable the CAN interface module in the WSL, to do so requires a re-building of the WSL kernel.

Requirements:

@rjhansen
rjhansen / keyservers.md
Last active October 18, 2024 01:57
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@tyteen4a03
tyteen4a03 / JobStopsListenerField.tsx
Last active October 18, 2024 01:50
PayloadCMS Listener Field Pattern (v3)
"use client";
import type { Job } from "@/payload-types";
import { gql, useQuery } from "@apollo/client";
import { useDocumentInfo, useForm } from "@payloadcms/ui";
import { useEffect, useState } from "react";
const WarehouseIdQuery = gql(/* GraphQL */ `
query WarehouseIdQuery {
Addresses(where: { type: { equals: warehouse } }) {
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active October 18, 2024 01:52
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@nntrn
nntrn / espn-api-list.md
Last active October 18, 2024 01:46
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

  • June 2021 - list of endpoints for other sports/leagues (i.e. basketball, baseball, lacrosse, rugby)
  • August 2021 - get historical fantasy league data
  • September 2021 - list of endpoints in plain text
  • May 2023 - collapsed endpoint response examples

Additional Resources

@posener
posener / go-shebang-story.md
Last active October 18, 2024 01:42
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@loilo
loilo / idb-backup-and-restore.md
Last active October 18, 2024 01:38
Back up and restore an IndexedDB database

Back up and restore an IndexedDB database

This gist is an ES module which provides functions to import and export data from an IndexedDB database as JSON. It's based on Justin Emery's indexeddb-export-import package, but applies some adjustments that reflect better on the current browser landscape (i.e. better developer ergonomics but no support for Internet Explorer).

Usage

For each of the provided functionalities, you need a connected IDBDatabase instance.

Export Data

import { idb } from 'some-database'